﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PerfumeShopManagement.Controller
{
    public static class ControllerFactory
    {
        private static IController accountController;
        private static IController productController;
        private static IController customerController;
        private static IController categoryController;
        private static IController exportCheckController;
        private static IController importCheckController;

        public static IController ImportCheckController
        {
            get
            {
                if (importCheckController == null)
                {
                    importCheckController = (IController)new ImportCheckController();
                }
                return importCheckController;
            }
        }

        public static IController ExportCheckController
        {
            get
            {
                if (exportCheckController == null)
                {
                    exportCheckController = (IController)new ExportCheckController();
                }
                return exportCheckController;
            }
        }

        public static IController CategoryController
        {
            get
            {
                if (categoryController == null)
                {
                    categoryController = (IController)new CategoryController();
                }
                return categoryController;
            }
        }

        public static IController AccountController
        {
            get 
            {
                if (accountController == null)
                {
                    accountController = (IController)new AccountController();
                }
                return accountController;
            }
        }

        public static IController ProductController
        {
            get
            {
                if (productController == null)
                {
                    productController = (IController)new ProductController();
                }
                return productController;
            }
        }

        public static IController CustomerController
        {
            get
            {
                if (customerController == null)
                {
                    customerController = (IController)new CustomerController();
                }
                return customerController;
            }
        }
	}
}
